import com.deepoove.poi.XWPFTemplate;
import java.io.IOException;
import java.util.HashMap;

public class WordUtil {

    public static void main(String[] args) throws IOException {
        XWPFTemplate.compile("C:\\Users\\jianfengw\\Desktop\\template.docx").render(new HashMap<String, Object>(){{
            put("title", "poi-tl template engine");
        }}).writeToFile("out_template.docx");
    }
}
